<?php

namespace app\common\validate\user;

use think\Validate;

class Address extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'contact' => 'require',
        'telephone' => 'regex:1[3-9]\d{9}',
        'address' => 'require',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'contact.require' => '请填写收货联系人',
        'telephone.regex' => '请填写正确手机号',
        'address.require' => '请填写详细地址',

    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => [],
    ];
}
